<?php
$time_start = microtime(true);
// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    get_include_path(),
)));

/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap();
//////////////////////////////////////////////////////////////////////////
//$request = new Zend_Controller_Request_Simple('send','sender','maillist');
$request = new Zend_Controller_Request_Http('http://srpremium.ru/sender/send/');
$front = Zend_Controller_Front::getInstance();
$front->setRequest($request);
//$front->setRouter(new Webf_Controller_Router_Cli());
//$front->setResponse(new Zend_Controller_Response_Cli());
$front->throwExceptions(true);
//$front->addModuleDirectory($pthRoot . '/application/modules/');
$front->dispatch();
//////////////////////////////////////////////////////////////////////////
$time_end = microtime(true);
$time = $time_end - $time_start;
echo "\n\nExecution time: {$time}";
?>